<?php


Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$.fn.yiiGridView.update('trx-pattycash-grid', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<h1>Manajemen Pattycash</h1>


<a href="<?php echo Yii::app()->createUrl('trxPattycash/create'); ?>" class="btn btn-sm btn-primary">Input Pattycash</a><br /><br />
<div class="search-form" style="display:none">
<?php $this->renderPartial('_search',array(
	'model'=>$model,
)); ?>
</div><!-- search-form -->

<?php $this->widget('zii.widgets.grid.CGridView',array(
	'itemsCssClass'=>'table table-hover table-striped table-bordered table-condensed',
	'id'=>'trx-pattycash-grid',
	'dataProvider'=>$model->search(),
	'filter'=>$model,
	'columns'=>array(
		'id',
		'nota_note',
		'coa_debet_id',
		'coa_credit_id',
		'nominal',
		'keterangan',
		/*
		'createdby',
		'createdtime',
		'updatedby',
		'updatedtime',
		'tgl_transaksi',
		'client_name',
		'mst_client_id',
		'sisa_bayar',
		'kurang_bayar',
		'no_nota_id',
		'jns_trx',
		'no_voucher',
		'jns_mata_uang',
		'hg_nh',
		*/
		array(
			'class'=>'bootstrap.widgets.TbButtonColumn',
		),
	),
)); ?>
